package com.ruoyi.solidProdution.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.solidProdution.mapper.ZcktzInfoMapper;
import com.ruoyi.solidProdution.domain.ZcktzInfo;
import com.ruoyi.solidProdution.service.IZcktzInfoService;

/**
 * 暂存库台账Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-02
 */
@Service
public class ZcktzInfoServiceImpl implements IZcktzInfoService 
{
    @Autowired
    private ZcktzInfoMapper zcktzInfoMapper;

    /**
     * 查询暂存库台账
     * 
     * @param zcktzId 暂存库台账ID
     * @return 暂存库台账
     */
    @Override
    public ZcktzInfo selectZcktzInfoById(Long zcktzId)
    {
        return zcktzInfoMapper.selectZcktzInfoById(zcktzId);
    }

    /**
     * 查询暂存库台账列表
     * 
     * @param zcktzInfo 暂存库台账
     * @return 暂存库台账
     */
    @Override
    public List<ZcktzInfo> selectZcktzInfoList(ZcktzInfo zcktzInfo)
    {
        return zcktzInfoMapper.selectZcktzInfoList(zcktzInfo);
    }

    /**
     * 新增暂存库台账
     * 
     * @param zcktzInfo 暂存库台账
     * @return 结果
     */
    @Override
    public int insertZcktzInfo(ZcktzInfo zcktzInfo)
    {
        zcktzInfo.setCreateTime(DateUtils.getNowDate());
        return zcktzInfoMapper.insertZcktzInfo(zcktzInfo);
    }

    /**
     * 修改暂存库台账
     * 
     * @param zcktzInfo 暂存库台账
     * @return 结果
     */
    @Override
    public int updateZcktzInfo(ZcktzInfo zcktzInfo)
    {
        zcktzInfo.setUpdateTime(DateUtils.getNowDate());
        return zcktzInfoMapper.updateZcktzInfo(zcktzInfo);
    }

    /**
     * 批量删除暂存库台账
     * 
     * @param zcktzIds 需要删除的暂存库台账ID
     * @return 结果
     */
    @Override
    public int deleteZcktzInfoByIds(Long[] zcktzIds)
    {
        return zcktzInfoMapper.deleteZcktzInfoByIds(zcktzIds);
    }

    /**
     * 删除暂存库台账信息
     * 
     * @param zcktzId 暂存库台账ID
     * @return 结果
     */
    @Override
    public int deleteZcktzInfoById(Long zcktzId)
    {
        return zcktzInfoMapper.deleteZcktzInfoById(zcktzId);
    }
}
